import request from '@/utils/request'

/* 列表分页*/
export function selectCategoryAttributePage(data) {
  return request({
    url: '/erp/categoryAttribute/selectCategoryAttributePage',
    method: 'post',
    data: data
  })
}

/* 新增*/
export function saveCategoryAttribute(data) {
  return request({
    url: '/erp/categoryAttribute/saveCategoryAttribute',
    method: 'post',
    data: data
  })
}

/* 修改*/
export function updateCategoryAttributeById(data) {
  return request({
    url: '/erp/categoryAttribute/updateCategoryAttributeById',
    method: 'post',
    data: data
  })
}

/* 根据分类id查询*/
export function selectByCategoryId(categoryId) {
  return request({
    url: '/erp/categoryAttribute/selectByCategoryId/' + categoryId,
    method: 'post'
  })
}

export function selectCategoryAttributeById(data) {
  return request({
    url: '/erp/categoryAttribute/selectCategoryAttributeById/' + data,
    method: 'post'
  })
}

/* 删除*/
export function deleteCategoryAttribute(data) {
  return request({
    url: '/erp/categoryAttribute/deleteCategoryAttribute',
    method: 'post',
    data: data
  })
}
